package com.up.upzl.biz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 视图解析控制器
 * 
 * @author joker
 *
 */
@Controller
@RequestMapping("view")
public class ViewResolverController {

	@RequestMapping("{path}.html")
	public String view(@PathVariable String path) {
		return path;
	}

	/**
	 * 转发到指定视图
	 * 
	 * @param path0
	 *            视图目录
	 * @param path1
	 *            视图名称
	 * @return 视图名称
	 */
	@RequestMapping("{path0}/{path1}.html")
	public String view(@PathVariable String path0, @PathVariable String path1) {
		return path0 + "/" + path1;
	}
}
